/**
 * Copyright 2008-2009. Chongqing Communications Industry Services Co.,Ltd Information Technology Branch. All rights
 * reserved. <a>http://www.cqcis.com</a>
 */
package com.cq.bd.service;

import java.util.List;
import java.util.Map;

import com.cq.base.domain.Page;
import com.cq.bd.domain.SWorker;
import com.cq.bd.domain.SWorkerFunction;
import com.cq.bd.domain.SWorkerRole;

/**
 * 用户管理服务
 * 
 * @author huangmy
 * @date   2009-10-5
 */
public interface WorkerService {
    /**
     * 创建员工
     * 
     * @param worker
     * @return
     */
    public void doCreateWorker(SWorker worker);
    
    /**
     * 修改员工
     * 
     * @param worker
     * @return
     */
    public void doUpdateWorker(SWorker worker);
    
    /**
     * 工号设置无效
     * 
     * @param loginId
     */
    public void doChangeWorkerState(Long loginId, int state);
    
    /**
     * 获取员工
     * 
     * @param loginCode
     * @return
     */
    public List<SWorker> doGetWorkersByLoginCode(String loginCode);
    
    /**
     * 分页查找
     * 
     * @param filter
     * @param like
     * @param sort
     * @param pageNo
     * @param pageSize
     * @return
     */
    public Page pageWorkers(Map<String, String> filter, Map<String, String> like, Map<String, String> sort, int pageNo, int pageSize);
    
    /**
     * 获取所有的员工
     * 
     * @return
     */
    public List<SWorker> doGetWorkers();
    
    /**
     * 获取指定的员工信息
     * 
     * @param loginId
     * @return
     */
    public SWorker doGetWorker(Long loginId);
    
    /**
     * 获取员工
     * 
     * @param staffId
     * @return
     */
    public List<SWorker> doGetWorkersByStaffId(Long staffId);
    
    /**
     * 工号与角色关联
     * 
     * @param workerRole
     */
    public void doCreateWorkerRole(SWorkerRole workerRole);
    
    /**
     * 删除工号与角色关联
     * 
     * @param workerRole
     */
    public void doRemoveWorkerRole(SWorkerRole workerRole);
    
    /**
     * 工号角色
     * 
     * @param loginId
     * @return
     */
    public List<SWorkerRole> doGetWorkerRoles(Long loginId);
    
    /**
     * 工号权限加减
     * 
     * @param workerFunc
     */
    public void doCreateWorkerFunc(SWorkerFunction workerFunc);
    
    /**
     * 修改工号权限加减
     * 
     * @param workerFunc
     */
    public void doUpdateWorkerFunc(SWorkerFunction workerFunc);
    
    /**
     * 删除工号权限加减
     * 
     * @param workerFunc
     */
    public void doRemoveWorkerFunc(SWorkerFunction workerFunc);
    
    /**
     * 工号权限
     * 
     * @param loginId
     * @return
     */
    public List<SWorkerFunction> doGetWorkerFuncs(Long loginId);
}
